import request from '@/utils/request'

// 添加用户学校信息
export function addschoolname(data) {
  return request({
    url: '/school/name',
    method: 'POST',
	data
  })
}
// 查询用户学校信息
export function selectschoolname(data) {
  return request({
    url: '/school/selectschool',
    method: 'GET',
	params:data
  })
}
// 查询用户信息
export function selectinfo(data) {
  return request({
    url: '/product/getinfo',
    method: 'GET',
	params:data
  })
}

// 查询学校列表
export function selectschoollist(data) {
  return request({
    url: '/school/schoollist',
    method: 'GET',
	params:data
  })
}
// 修改用户学校信息
export function updateschoolname(data) {
	console.log(data);
  return request({
    url: '/school/updateschool',
    method: 'POST',
	data
  })
}

// 查询商品列表
export function selectproductlist(data) {
	console.log(data);
  return request({
    url: '/product/productList',
    method: 'GET',
	params:data
  })
}
// 删除商品
export function removeproduct(data) {
  return request({
    url: '/product/removeproduct',
    method: 'DELETE',
	data
  })
}
// 发布商品
export function addproduct(data) {
  return request({
    url: '/product/addproduct',
    method: 'POST',
	data
  })
}
// 查询商品评论
export function selectproductmessagelist(data) {
	console.log(data);
  return request({
    url: '/leave/messagelist',
    method: 'GET',
	params:data
  })
}

// 新增商品留言
export function addproductmessage(data) {
	console.log(data);
  return request({
    url: '/leave/addmessage',
    method: 'POST',
	data
  })
}
// 查询用户关注
export function selectfollowuser(data) {
  return request({
    url: '/followuser/select',
    method: 'GET',
	params:data
  })
}

// 查询用户是否已关注
export function selectjudgefollow(data) {
  return request({
    url: '/followuser/judgefollow',
    method: 'GET',
	params:data
  })
}

// 新增关注
export function addfollow(data) {
  return request({
    url: '/followuser/addfollow',
    method: 'POST',
	data
  })
}
// 取消关注
export function removefollow(data) {
  return request({
    url: '/followuser/removefollow',
    method: 'DELETE',
	data
  })
}
// 查询粉丝列表
export function selectlist(data) {
  return request({
    url: '/followuser/selectlist',
    method: 'GET',
	params:data
  })
}

// 新增收藏
export function addcollect(data) {
  return request({
    url: '/collect/add',
    method: 'POST',
	data
  })
}
// 新增收藏
export function removecollect(data) {
  return request({
    url: '/collect/remove',
    method: 'DELETE',
	data
  })
}
// 查询是否收藏
export function selectcollect(data) {
  return request({
    url: '/collect/one',
    method: 'GET',
	params:data
  })
}
// 查询收藏列表
export function selectcollectlist(data) {
  return request({
    url: '/collect/list',
    method: 'GET',
	params:data
  })
}

// 查询聊天列表
export function selectchatlist(data) {
  return request({
    url: '/chat/list',
    method: 'GET',
	params:data
  })
}

// 添加聊天历史
export function addchathistory(data) {
  return request({
    url: '/chathistory/addchat',
    method: 'POST',
	data
  })
}
// 查询聊天历史
export function selectchathistorylist(data) {
  return request({
    url: '/chathistory/chatlist',
    method: 'GET',
	params:data
  })
}
// 添加聊天列表
export function addchatlist(data) {
  return request({
    url: '/chat/add',
    method: 'POST',
	data
  })
}
// 查询聊天列表
export function selectchatlist1(data) {
	console.log(data);
  return request({
    url: '/chat/one',
    method: 'GET',
	params:data
  })
}

// 删除聊天列表
export function removechatlist(data) {
  return request({
    url: '/chat/removetable',
    method: 'DELETE',
	data
  })
}
// 删除聊天记录
export function removechathistory(data) {
	console.log(data);
  return request({
    url: '/chathistory/removechat',
    method: 'POST',
	data
  })
}
// 查询贴吧列表
export function selectpostbarlist(data) {
	console.log(data);
  return request({
    url: '/postbar/list',
    method: 'GET',
	params:data
  })
}
// 根据id查询贴吧
export function selectpostbarid(id) {
  return request({
    url: '/postbar/'+id,
    method: 'GET'
  })
}
// 删除贴吧收藏
export function removepostbar(data) {
  return request({
    url: '/postbarcollect/remove',
    method: 'POST',
	data
  })
}
// 添加贴吧收藏
export function addpostbar(data) {
  return request({
    url: '/postbarcollect/add',
    method: 'POST',
	data
  })
}
// 查询贴吧收藏
export function selectpostbar(data) {
  return request({
    url: '/postbarcollect/one',
    method: 'GET',
	params:data
  })
}
// 查询贴吧收藏列表
export function selectpostbarlist1(data) {
	console.log(data);
  return request({
    url: '/postbar/collectlist',
    method: 'GET',
	params:data
  })
}
// 查询贴吧评论列表
export function selectpostbarmessage(data) {
	console.log(data);
  return request({
    url: '/postbarmessage/list',
    method: 'GET',
	params:data
  })
}
// 添加贴吧评论
export function addpostbarmessage(data) {
	console.log(data);
  return request({
    url: '/postbarmessage/add',
    method: 'POST',
	data
  })
}
// 添加贴吧
export function addpostbar1(data) {
	console.log(data);
  return request({
    url: '/postbar/add',
    method: 'POST',
	data
  })
}
// 删除贴吧
export function removepostbar1(data) {
	console.log(data);
  return request({
    url: '/postbar/remove',
    method: 'POST',
	data
  })
}